import {reqBooksList} from "@/api";
//search模块
const state={
    booksList:[]
};
const mutations={
    GETBOOKSLIST(state,booksList){
        state.booksList=booksList;
    },
};
const actions={
    async getBooksList({commit}){
        let result=await reqBooksList();
        if(result.code==200){
            commit('GETBOOKSLIST',result.data);
            console.log(result.data);
        }
    },
};
//仓库计算属性
const getters= {};
export default {
    state,
    mutations,
    actions,
    getters
}
